﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using FOBTV.Web.MainClass;
using FOBTV.Web.DBUtility.ManagerImpl;

namespace FOBTV.Web.FOBTV2012.en
{
    public partial class news : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
			if (!base.IsPostBack)
			{
				this.BindData();
			}
		}

		public void BindData()
		{
			DataTable table = YOCOSBusiness.NewsManager.GetNewsListByCategory("2012");
			this.rptNewsList2012.DataSource = table;
			this.rptNewsList2012.DataBind();

			DataTable table2 = YOCOSBusiness.NewsManager.GetNewsListByCategory("2011");
			this.rptNewsList2011.DataSource = table2;
			this.rptNewsList2011.DataBind();
		}

		protected string GetShortNewsContent(string content)
		{
			return StringUtil.GetShortContent(content, 40);
		}
    }
}